package com.shy.mapper;

import com.shy.config.common.BaseQuery;
import com.shy.config.util.DataScope;
import com.shy.entity.User;

import java.util.List;

/**
* @author sunhuanyu
* @description 针对表【t_user(用户表)】的数据库操作Mapper
* @createDate 2024-12-09 11:57:17
* @Entity com.shy.entity.User
*/
public interface UserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUsername(String loginAct);

    User queryUserDetailById(Integer userId);

    /**
     * 查询用户列表
     * @return
     */
    @DataScope(tableAlias = "tu", tableField = "id")
    List<User> queryUserListByPage(BaseQuery baseQuery);

    int batchDelete(List<Integer> userIds);

    /**
     * 查询所有用户
     * @return
     */
    List<User> queryUserList();
}
